package cn.tedu.shoot;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.Random;

public class Laser extends FlyingObject {
	private int yspeed;
	private int timeIndex;
	public Laser (){
		super(512,30,0,768);
		yspeed = 5;
		timeIndex=0;
		
	}
	int index = 0;
	public BufferedImage getImage() {		
		return Images.laserx[index++%Images.laserx.length];
	}
	public void step() {
		if(y>-90) {
			y-=yspeed;	
		}
		}
	public int getY() {
		return y;
	}
	public boolean outBounds() {
		return y==-90;
	}
}
